package com.liu.jpa.entity;

import lombok.Data;
import org.junit.jupiter.api.Test;

import javax.persistence.*;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@Entity
@Table(name = "user")
public class User {

    @Id
    @Column(name = "id")
    private Integer id;

    @Column(name = "username")
    private String username;

    @Column(name = "gender")
    private String gender;

    @Column(name = "age")
    private Integer age;

    @Test
    public void test1(){
        SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
        Date date = new Date();
        System.out.println(sim.format(new Date(date.getYear(), 7, 0)));
    }
}
